package com.briup.cms.dao;

import com.briup.cms.bean.Carousel;
import com.briup.cms.exception.CustomerException;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CarouselMapper {
    // 分页查询轮播图信息
    List<Carousel> findAll(int pageNum, int pageSize)throws CustomerException;

    // 通过id删除轮播图信息
    void deleteById(int id) throws CustomerException;

    // 用于判断id数据是否存在
    Carousel findById(int id) throws CustomerException;

    // 保存轮播图信息
    void saveCarousel(Carousel carousel)throws CustomerException;

    Carousel findByUrl(String url) throws CustomerException;

    // 更新轮播图状态信息
    void updateCarouselByStatus(int id,int status)throws CustomerException;

    //更新轮播图信息
    void updateCarousel(Carousel carousel)throws CustomerException;

    // 查询所有已经启用的轮播图
    List<Carousel> findYesCarousel()throws CustomerException;
}
